import axios from 'axios'

const http = axios.create({
  timeout: 300000,
  baseURL: 'https://qc.chinacpc.org'
})

// 请求拦截
http.interceptors.request.use(config => {
  config.headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  return config
}, error => {
  Promise.reject(error)
})
// 响应拦截
http.interceptors.response.use(res => {
  return res
}, error => {
  return Promise.reject(error)
})

export default http
